﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PetaPoco;

namespace WebAppMatrix.DAL
{
    public interface IRepository<T> where T : class, new()
    {
        T GetSingle(object id);
        T GetFirst(string sql, params object[] args);
        List<T> GetList(string sql, params object[] args);
        List<T> GetAll();

        void Insert(T entity);
        void Update(T entity);
        void Delete(T entity);

        Page<T> Page(long page, long rows, string sql, params object[] args);
    }
}
